
struct lua_State;
struct KCPPop;

struct TransactionContext{
	uint32_t pool_idx_;

	uint8_t pool_stat_;
	uint8_t times_resume_;	// how much times the lua coroutine has been resumed
	uint8_t io_type_;	// 0-kcp 1-tcp
	uint8_t padding1_;
	
	uint32_t serial_no_;
	uint32_t my_creator_;

	lua_State *main_vm;
	lua_State *co;

	void reset(){
		times_resume_ = 0;
		io_type_ = 0;
		padding1_ = 0;
		serial_no_ = 0;
		my_creator_ = (uint32_t)-1;
		main_vm = NULL;
		co = NULL;
	}
} __attribute__((aligned(4)));
